package com.gigi.searchcenterbackendmaster.datasource;

import com.gigi.searchcenterbackendmaster.model.vo.UserVO;
import com.gigi.searchcenterbackendmaster.service.UserService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户数据源
 *
 * @author Gigi
 * @date 2024/8/17 17:17
 */
@Component
public class UserDataSource implements DataSource<UserVO> {

    @Resource
    private UserService userService;

    @Override
    public List<UserVO> doSearch(String keyword) {
        return userService.searchFromEs(keyword);
    }

}
